SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO




CREATE Proc [dbo].[SP_TXEXTR_BANC_U03]  
/*-------------------------------------------------------------------*/  
/*----- Empresa          : OFISIS.                              -----*/  
/*----- Cliente          : OFISIS.                              -----*/  
/*----- Sistema          : Contabilidad                         -----*/  
/*----- Modulo           : Empresa                              -----*/  
/*----- Programa         : Proceso de Desmarcar Cuentas         -----*/  
/*----- Nombre           : SP_TXEXTR_BANC_U03                   -----*/  
/*----- Script           : TXEXTR_BANC                          -----*/  
/*----- Desarrollado por : Marco Acuna                          -----*/  
/*----- Fecha            : 20/01/2003                           -----*/  
/*----- Base de Datos    : SQL 7.0                              -----*/  
/*----- Version BD       :                                      -----*/  
/*----- Invoca a SP      :                                      -----*/  
/*-------------------------------------------------------------------*/  
/*---------------------------------------------------------------------*/  
/*----- Modificado 1 por : percy garcia                           -----*/  
/*----- Fecha Modifica   : 05/06/2004                             -----*/  
/*----- Detalle Modifica : usuario creacion y modif               -----*/  
/*---------------------------------------------------------------------*/  
/*---------------------------------------------------------------------*/  
/*----- Drop Proc SP_TXEXTR_BANC_U03                       -----*/  
/*----- Grant Execute On SP_TXEXTR_BANC_U03 To PUBLIC             -----*/  
/*----- SP_TXEXTR_BANC_U03 '01',1,1999,3, '10401'                -----*/  
/*---------------------------------------------------------------------*/  
/*------------------------------------------------------------------*/  
@ISCO_EMPR        TD_VC_002,  
@INNU_CNTB_EMPR   TD_IN_001,  
@INNU_ANNO        TD_IN_004_ANNO,  
@INNU_MESE        TD_IN_002_MESE,  
@ISCO_CNTA_EMPR   TD_VC_020  
AS  
  
          
      Update TXEXTR_BANC  
      Set   ST_FLAG = 'N',  
            NU_ANNO_CONS = NULL,  
            NU_MESE_CONS = NULL,  
  CO_USUA_MODI = system_user,  
  FE_USUA_MODI = GETDATE()  
 Where CO_EMPR      = @ISCO_EMPR   
 And   NU_CNTB_EMPR = @INNU_CNTB_EMPR   
 And   NU_ANNO   = @INNU_ANNO   
  And   NU_MESE   <= @INNU_MESE   
       AND  RTRIM(LTRIM(CO_CNTA_EMPR))=RTRIM(LTRIM(@ISCO_CNTA_EMPR))  
       AND  ST_FLAG = 'S'  
       AND  NU_ANNO_CONS = @INNU_ANNO  
       AND  NU_MESE_CONS = @INNU_MESE;  
        
      Update TXMVTO_BANC  
 Set   ST_FLAG      = 'N',  
            NU_ANNO_CONS = NULL,  
            NU_MESE_CONS = NULL,  
  CO_USUA_MODI = system_user,  
  FE_USUA_MODI = GETDATE()  
 Where CO_EMPR      = @ISCO_EMPR   
 And   NU_CNTB_EMPR = @INNU_CNTB_EMPR   
 And   NU_ANNO   = @INNU_ANNO   
 And   NU_MESE   <= @INNU_MESE   
      AND  RTRIM(LTRIM(CO_CNTA_EMPR))=RTRIM(LTRIM(@ISCO_CNTA_EMPR))  
      AND   ST_FLAG  ='S'  
      AND   NU_ANNO_CONS = @INNU_ANNO  
      AND   NU_MESE_CONS = @INNU_MESE;  
  
     
RETURN  
/*---------------------------------- Fin --------------------------*/  
  
  
  
  
  







GO
